<html>
<body>
Reports method calls whose target is another method call.
The quick-fix suggests to introduce a local variable.
<p><b>Example:</b></p>
<pre><code>
  class X {
    int foo(File f) {
      return f.getName().length();
    }
  }
</code></pre>
<p>After the quick-fix is applied:</p>
<pre><code>
  class X {
    int foo(File f) {
      final String name = f.getName();
      return name.length();
    }
  }
</code></pre>
<!-- tooltip end -->
<p>Use the inspection options to toggle warnings for the following cases:</p>
<ul>
  <li>
    <p>
      chained method calls in field initializers,
      for instance, <code>private final int i = new Random().nextInt();</code>
    </p>
  </li>
  <li>
    <p>
      chained method calls operating on the same type,
      for instance, <code>new StringBuilder().append("x: ").append(new X()).append("y: ").append(new Y()).toString();</code>.
    </p>
  </li>
</ul>

</body>
</html>